package org.mil.util;

import java.util.Locale;
import java.util.ResourceBundle;

public class ResourceUtil {
	
	private static ResourceBundle systemProperties;
        //配置文件myConfig.properties放在classpath下面otherConfigs目录下面
	public static final String PROPERTIES_FILE_NAME = "config";
        //通过静态块加载 ResourceBundle 类
	static{
		try{
			systemProperties = ResourceBundle.getBundle(PROPERTIES_FILE_NAME,Locale.ENGLISH);
		}catch(Exception e){
			e.printStackTrace();
		}
	}

	public static String getPropertyByName(String name) {
		
		return systemProperties.getString(name);
	}
}
